# $Id$
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: tobias <tobias@archlinux.org>

pkgname=libmpd
pkgver=11.8.17
pkgrel=3
pkgdesc="Signal based wrapper around libmpdclient"
arch=('i686' 'x86_64')
url="http://gmpc.wikia.com/wiki/Gnome_Music_Player_Client"
license=('GPL')
depends=('glib2')
source=("http://download.sarine.nl/Programs/gmpc/${pkgver%.*}/${pkgname}-${pkgver}.tar.gz"
        '0001-fix-return-value.patch'
        '0002-include-config.h.patch'
        '0003-fix-comparison.patch')
sha256sums=('fe20326b0d10641f71c4673fae637bf9222a96e1712f71f170fca2fc34bf7a83'
            'd8f93df567479bca89df17ebbe5db103ce36da01d5574d24184679659b731b97'
            '8f87b7cf45bd57d2d7c7c59f66b60b6c49bebff910dcf0716b82d18905c0846b'
            'f36b2a5bd9e0794a2945b840ac15ad72253874ede4d655282b978598b7a94662')

prepare() {
  cd $pkgname-$pkgver
  patch -Np1 < "${srcdir}"/0001-fix-return-value.patch
  patch -Np1 < "${srcdir}"/0002-include-config.h.patch
  patch -Np1 < "${srcdir}"/0003-fix-comparison.patch
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="${pkgdir}" install
}
